package housing.task5.jaxb;

import housing.task1.actor.Address;

import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

/**
 * Class only for proper marshalling/unmarshalling collection<Address> by JAXB
 * <p/>
 * Created by IntelliJ IDEA.
 * User: Linderhof
 * Date: 05.12.2010
 * Time: 2:35:38
 */

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
        "Address"
})
@XmlRootElement(name = "Addresses")
public class Addresses implements IXmlCollectable {
    @XmlElement(required = true)
    protected List<Address> Address;

    public List<Address> getAddress() {
        if (Address == null) {
            Address = new ArrayList<Address>();
        }
        return this.Address;
    }

    @Override
    public List getCollectionAsList() {
        if (Address == null) {
            Address = new ArrayList<Address>();
        }
        return this.Address;
    }
}
